;Assembler header file for FSLock
;written by DefMod (Dec 31 2005) on Sat Dec 31 14:01:38 2005
;Jonathan Coxhead, jonathan@doves.demon.co.uk, 29 June 1995

        [       :LNOT: :DEF: FSLock_Hdr
        GBLS    FSLock_Hdr

        [       :LNOT: :DEF: Get_Types
        GBLS    Get_Types
        ]
        [       :LNOT: :DEF: Types_Hdr
Get_Types                       SETS    "GET oslib/Types.Hdr"
        |
Get_Types                       SETS    ""
        ]
        $Get_Types

        [       :LNOT: :DEF: Get_OS
        GBLS    Get_OS
        ]
        [       :LNOT: :DEF: OS_Hdr
Get_OS                          SETS    "GET oslib/OS.Hdr"
        |
Get_OS                          SETS    ""
        ]
        $Get_OS

        [       :LNOT: :DEF: Get_FileSwitch
        GBLS    Get_FileSwitch
        ]
        [       :LNOT: :DEF: FileSwitch_Hdr
Get_FileSwitch                  SETS    "GET oslib/FileSwitch.Hdr"
        |
Get_FileSwitch                  SETS    ""
        ]
        $Get_FileSwitch

;Symbols for constants
FSLock_StatusUnlocked           *       &0
FSLock_StatusProtected          *       &1
FSLock_StatusLocked             *       &2
Error_FSLockUnknownSWI          *       &806500
Error_FSLockLocked              *       &806501
Error_FSLockUnknownFS           *       &806502
Error_FSLockFSNotLockable       *       &806503
Error_FSLockNoLockedFS          *       &806504
Error_FSLockProtectedDisc       *       &806505
Error_FSLockKilled              *       &806506

;Symbols for structure offsets and sizes
                                ^       0
                                #       Int
FSLock_LockStatus               *       @


;Symbols for SWI's and SWI reason codes
XFSLock_Version                 *       &64780
FSLock_Version                  *       &44780
   ;Exit
   ;  R0 = version (Int)
   ;  R1 = workspace (pointer to Void)

XFSLock_Status                  *       &64781
FSLock_Status                   *       &44781
   ;Exit
   ;  R0 = lock_status (FSLock_LockStatus)
   ;  R1 = fs_no (FileSwitch_FSNo)

XFSLock_ChangeStatus            *       &64782
FSLock_ChangeStatus             *       &44782
   ;Entry
   ;  R0 = new_lock_status (FSLock_LockStatus)
   ;  R1 -> password (String)
   ;  R2 -> new_password (String)
   ;  R3 = new_fs_no (FileSwitch_FSNo)

        ]
        END
